<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:c="http://java.sun.com/jsp/jstl/core"
    xmlns:ace="http://www.icefaces.org/icefaces/components"
    xmlns:ice="http://www.icesoft.com/icefaces/component"
    xmlns:icecore="http://www.icefaces.org/icefaces/core"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:b="http://java.sun.com/jsf/composite/ezcomp"
    template="/resources/templates/template.xhtml">
    
    <ui:define name="title">TallerStudio</ui:define>
   
    <ui:define name="body">
        <style type="text/css">
                    /* To layout lists side by side if space is available */
                    .subList {
                        font-size: 80% !important;
                    }
                </style>
        <h:form id="formBody">
             <h:panelGroup style="padding: 0.5em;" layout="block">
                         
                <ace:listControl id="dualListControl"   style="width:50%; margin:0 auto 0 auto;">
                    <f:facet name="header">
                        Permisos del Rol:  <h:outputLabel value="#{rolMBean.rol.rol}" />
                    </f:facet>

                 <ace:list id="firstList" value="#{rolMBean.listaOrigen}"
                           styleClass="subList"   
                           dropGroup="textGroup"
                              selectionMode="multiple" 
                              
                               />

                 <ace:list id="secondList" value="#{rolMBean.listaDestino}"
                           styleClass="subList"   
                           dropGroup="textGroup"
                              selectionMode="multiple"
                              />
                </ace:listControl>
            
             </h:panelGroup>

            <div id="contenidoBotonesId" class="contenidoBotones">
               <f:ajax>
                <b:boton value="Volver a la lista" title="Volver a la lista" styleClass="flotarIzquierda" action="#{rolMBean.volver}"/>
               </f:ajax> 
                <b:boton value="Aceptar" title="Aceptar" styleClass="flotarDerecha" action="#{rolMBean.editarPermisos}"/>
            </div>
        </h:form>
    </ui:define>

</ui:composition>

